package com.simen.hellobytes.socket.helper;

import java.io.IOException;

/**
 * @author Created by Simen.
 * @date 创建日期 2018/5/25 12:55
 * @modify 修改者 Simen
 */
public interface MessageListener<D,T> {

    int KEEP = 1;//keep connect
    int DISCONNECT = 0;//disconnect immediately
    int LEAVE = 2;//leave but not disconnect immediately

    int onMessage(D buf, int length, T clientInfo) throws IOException;

}
